Skip to content

Add AFL scoreboard plugin#183

Open
ChuckBuilds wants to merge 1 commit into
mainfrom
claude/afl-scoreboard
Open

Add AFL scoreboard plugin#183
ChuckBuilds wants to merge 1 commit into
mainfrom
claude/afl-scoreboard

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

Summary

Adds a new AFL (Australian Football League) scoreboard plugin, forked from the sport-agnostic soccer-scoreboard. AFL is a single league, so this is a flattened, simpler version of the multi-league template — no leagues/custom_leagues nesting, no national-flag handling.

It shows live, recent, and upcoming AFL games with real-time scores and game status, mapping AFL's four quarters (Q1–Q4) + HALF + Final + pre-game start time onto the shared period_text/clock model.

Data source

ESPN public scoreboard (no auth):
https://site.api.espn.com/apis/site/v2/sports/australian-football/afl/scoreboard → HTTP 200, real 2026-season data. sport = australian-football, league = afl. Score is a single running integer per team; quarter comes from status.period (1–4), clock from status.displayClock.

Parity with soccer-scoreboard

Full feature/customization parity, collapsed to one league:

  • Display modes: afl_live, afl_recent, afl_upcoming
  • Switch and scroll display modes
  • Favorite teams / exclude teams / show-favorite-only filtering
  • Dynamic duration (per-mode enable + caps) and fixed mode_durations
  • Live priority + goal/win celebration takeover
  • Vegas continuous-scroll hooks (get_vegas_content_typemulti)
  • Full customization block (fonts/sizes) lifted verbatim from soccer's schema
  • Auto-downloaded team logos (ESPN CDN), no bundled assets

Sport-generic modules (sports.py, game_renderer.py, data_sources.py, base_odds_manager.py, dynamic_team_resolver.py, scroll_display.py) are copied with only soccer wording / logo-dir constants updated for AFL.

Files

  • plugins/afl-scoreboard/manager.pyAflScoreboardPlugin (single-league orchestrator)
  • plugins/afl-scoreboard/afl_managers.py — ESPN fetch + AFL parsing, create_afl_managers
  • plugins/afl-scoreboard/config_schema.json — flat single-league draft-07 schema
  • plugins/afl-scoreboard/manifest.json, README.md, requirements.txt
  • plugins/afl-scoreboard/test/harness.json + test_afl_plugin.py
  • plugins.json — registry entry (plugin_path: plugins/afl-scoreboard)

Test plan

  • python3 -m py_compile passes on every .py
  • manifest.json, config_schema.json, test/harness.json, plugins.json all parse
  • python3 test_afl_plugin.py passes (display modes, mode routing, empty-manager skip, live content, AFL quarter period_text mapping)
  • Live ESPN AFL endpoint returns HTTP 200; parser handles its actual status/competitors fields
  • grep -ri soccer plugins/afl-scoreboard/ clean except two origin-provenance comments
  • Run core scripts/check_plugin.py against test/harness.json across matrix sizes (needs a LEDMatrix core checkout)
  • Install via plugin store on devpi/ledpi and visually confirm live/recent/upcoming rendering

🤖 Generated with Claude Code

Fork the sport-agnostic soccer-scoreboard into a single-league AFL
(Australian Football League) scoreboard.

- New afl_managers.py: ESPN australian-football/afl fetch + parsing, with
  AFL quarter (Q1-Q4) / HALF / Final / pre-game period_text mapping.
- New single-league manager.py (AflScoreboardPlugin): afl_live / afl_recent /
  afl_upcoming modes, keeping switch/scroll display, dynamic duration, live
  priority + celebration, and Vegas scroll hooks.
- Verbatim sport-generic modules (sports.py, game_renderer.py, data_sources.py,
  base_odds_manager.py, dynamic_team_resolver.py, scroll_display.py) with soccer
  wording/logo-dir constants updated for AFL.
- Flat single-league config_schema.json (draft-07) with full customization
  parity lifted from soccer's per-league schema.
- manifest.json, README.md, requirements.txt, plugins.json registry entry.
- test/harness.json fixture (live/recent/upcoming) + test_afl_plugin.py smoke
  tests (mode routing, live content, AFL quarter parsing).

Data source: https://site.api.espn.com/apis/site/v2/sports/australian-football/afl/scoreboard

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KEZK1P1Q1fu5pcuVrkrCFZ
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ChuckBuilds, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 87829db5-f807-4e2b-b4ab-7a5f213721ee

📥 Commits

Reviewing files that changed from the base of the PR and between 25780e7 and 861be4e.

📒 Files selected for processing (17)
  • plugins.json
  • plugins/afl-scoreboard/.gitignore
  • plugins/afl-scoreboard/LICENSE
  • plugins/afl-scoreboard/README.md
  • plugins/afl-scoreboard/afl_managers.py
  • plugins/afl-scoreboard/base_odds_manager.py
  • plugins/afl-scoreboard/config_schema.json
  • plugins/afl-scoreboard/data_sources.py
  • plugins/afl-scoreboard/dynamic_team_resolver.py
  • plugins/afl-scoreboard/game_renderer.py
  • plugins/afl-scoreboard/manager.py
  • plugins/afl-scoreboard/manifest.json
  • plugins/afl-scoreboard/requirements.txt
  • plugins/afl-scoreboard/scroll_display.py
  • plugins/afl-scoreboard/sports.py
  • plugins/afl-scoreboard/test/harness.json
  • plugins/afl-scoreboard/test_afl_plugin.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/afl-scoreboard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 3 high · 2 medium

Alerts:
⚠ 5 issues (≤ 0 issues of at least minor severity)

Results:
5 new issues

Category Results
ErrorProne 3 high
Security 2 medium

View in Codacy

🟢 Metrics 1150 complexity

Metric Results
Complexity 1150

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant